package com.glr;

import com.glr.service.UserService;
import com.spring.GlrApplicationContext;

/**
 * @author GLoRy
 * @date 2021/5/22 15:24
 */
public class Test {
    public static void main(String[] args) {
        GlrApplicationContext applicationContext = new GlrApplicationContext(AppConfig.class);

        UserService userService = (UserService) applicationContext.getBean("userService");
        userService.test();
        //1.代理对象
        //2.业务test

 /*       //如果是单例bean，底层应该有个map<beanName , bean对象>
        System.out.println(applicationContext.getBean("userService"));
        System.out.println(applicationContext.getBean("userService"));
        System.out.println(applicationContext.getBean("userService"));*/
    }
}
